home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1997 February / EnigmA AMIGA RUN 15 (1997)(G.R. Edizioni)(IT)[!][issue 1997-02][PLANET CD V].iso / enigma / earcd / utility / utilcli / scrnshff.lha / ScreenShuffle.e < prev    next >
Text File  |  1996-12-02  |  816b  |  51 lines

  1.  
  2. MODULE 'intuition/screens'
  3.  
  4. DEF name[200]:STRING, scr:PTR TO screen
  5.  
  6. DEF front, back
  7.  
  8. PROC main()
  9.  
  10.     readArgs()
  11.  
  12.     IF scr:=LockPubScreen(name)
  13.  
  14.         IF front THEN ScreenToFront(scr)
  15.  
  16.         IF back THEN ScreenToBack(scr)
  17.  
  18.         UnlockPubScreen(NIL, scr)
  19.  
  20.     ENDIF
  21.  
  22. ENDPROC
  23.  
  24. -> static data
  25. CHAR '$VER: ScreenShuffle 0.1 (2.12.96)'
  26.  
  27. PROC readArgs()
  28.  
  29.     DEF args:PTR TO LONG, rdargs:PTR TO LONG
  30.  
  31.     IF rdargs:=ReadArgs('SCREEN/A,FRONT/S,BACK/S', args:=[0, FALSE, FALSE]:LONG, NIL)
  32.  
  33.         IF StrLen(args[0]) THEN StrCopy(name, args[0]) ELSE StrCopy(name, 'Workbench')
  34.  
  35.         front:=(args[1]<>0)
  36.         back:=(args[2]<>0)
  37.  
  38.         IF Not(front OR back) THEN front:=TRUE
  39.  
  40.         FreeArgs(rdargs)
  41.  
  42.     ELSE
  43.  
  44.         StrCopy(name, 'Workbench')
  45.         front:=TRUE
  46.         back:=FALSE
  47.  
  48.     ENDIF
  49.  
  50. ENDPROC
  51.